﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SSS.Core.Model;

namespace SSS.Core.Service
{
    /// <summary>
    /// 提供角色操作相关服务
    /// </summary>
    interface IRoleService : IService
    {
        int DeleteRole(int roleId);
        int DeleteRoleUsers(int roleId);
        int DeleteUserFromRole(int roleId, int userId);
        string GetRolePermissions(int roleId, string name);
        IList<Role> GetRoles();
        IList<string> GetRoleUsers(int roleId);
        IList<string> GetUserPermissions(string userId, string name);
        IList<Role> GetUserRoles(int userId);
        int InsertUserToRole(int roleId, int userId);
        Role LoadRole(int roleId);
        int SaveRole(Role role);
        int UpdateResource(int roleId, string name, string permissions);
        int UpdateRole(Role role);
    }
}
